#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;

class Solution{
    public:
    int ans1(int n){
        vector<int> dp(n+1, 0);
        if(n == 1 || n == 2){
            return n;
        }
        dp[1] = 1;
        dp[2] = 2;
        for(int i = 3; i != n+1; i++){
            dp[i] = dp[i-1] + dp[i-2];
        }
        return dp[n];
    }
};

void test1(){
    Solution s;
    int n = 2;

    int ret = s.ans1(n);
    cout << ret << endl;
}

void test2(){
    Solution s;
    int n = 5;

    int ret = s.ans1(n);
    cout << ret << endl;
}

int main(void){
    test1();
    test2();

    return 0;
}